# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python-apksigtool
_pkgname=apksigtool
pkgver=0.1.0
pkgrel=3
pkgdesc='Parse & verify android apk signing blocks.'
arch=('any')
url='https://pypi.org/project/apksigtool/#files'
license=('AGPL3')
depends=('python' 'python-click' 'python-simplejson' 'python-asn1crypto'
         'python-cryptography' 'apksigcopier')
makedepends=('python-build' 'python-pip' 'python-wheel')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('a1fc92803fc7831abcaf266a82b675dea8f44cbeb137da6d13539c24ba7900ac1b59a41505381f0ddbf2a3cae396138ce4d5e5e026443000d38baa38ecb50f02')

build() {
  cd "$_pkgname-$pkgver"

  python -m build --wheel --outdir="$startdir/dist"
}

package() {
  cd "$_pkgname-$pkgver"

  pip install \
    --verbose \
    --disable-pip-version-check \
    --no-warn-script-location \
    --ignore-installed \
    --no-compile \
    --no-deps \
    --root="$pkgdir" \
    --prefix=/usr \
    --no-index \
    --find-links="file://$startdir/dist" \
    $_pkgname
}

